package com.teamwork.ZuccEcho.Repository;

import com.teamwork.ZuccEcho.Entity.Qnquestion;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface QnquestionRepository extends JpaRepository<Qnquestion,Long>, JpaSpecificationExecutor<Qnquestion> {
    Qnquestion findById(long id);

    @Query(value = "select * from qnquestion where qn_id=?1",nativeQuery = true)
    List<Qnquestion> findQuestions(long qn_id);
}
